<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
//
//Route::get('think', function () {
//    return 'hello,ThinkPHP5!';
//});
//
//Route::get('hello/:name', 'index/hello');
use think\facade\Route;
Route::group('v1',function (){
    Route::get('user/personal','first/user/personal');
    Route::post('user/hobbies','first/user/hobbies');
    Route::post('user/info','first/user/info');
    Route::post('user/head','first/user/head');
    Route::post('user/nickname','first/user/nickname');
    Route::post('user/sex','first/user/sex');
    Route::post('user/password','first/user/password');
    Route::post('user/phone','first/user/phone');
    Route::post('user/login','first/user/login');
    Route::any('get_access_token','first/auth/accessToken');
    Route::any('access_token','first/auth/accessToken');
    Route::resource('user','first/user');
    Route::any('user/sendCode','first/user/sendCode');
});

Route::group('admin',function (){
    Route::resource('user','admin/user');
    Route::any('export','admin/export/export');
    Route::any('qiniu/token','first/Qiniu/qiNiuAccess');
    Route::any('qiniu/upload_ueditor','first/Qiniu/uploadEditor');
    Route::any('qiniu/del_image','first/Qiniu/qiNiuDelete');
    Route::resource('roles','admin/roles');
    Route::resource('admin','admin/admin');
    Route::resource('log','admin/AdminLog');
    Route::resource('member','admin/Member');
    Route::resource('table','admin/TableFields');

});

Route::post('posts','admin/Uploadify/upload');
Route::delete('posts','admin/Uploadify/delete');
Route::get('wiki','first/first/Wiki/index');
Route::any('upload/qiniu','first/Uploadify/toQiNiu');
Route::get('upload/qiniu_access','first/Uploadify/qiNiuAccess');
Route::any('v1/uploads','first/Uploadify/uploads');
